package com.wjj.happytime.fragment.main_frg;


import android.content.Intent;
import android.os.Bundle;
import android.support.annotation.Nullable;
import android.support.v4.app.Fragment;
import android.view.LayoutInflater;
import android.view.View;
import android.view.View.OnClickListener;
import android.view.ViewGroup;

import android.widget.RelativeLayout;
import com.wjj.happytime.R;
import com.wjj.happytime.activity.me_activity.MyCollectActivity;

/**
 * A simple {@link Fragment} subclass.
 */
public class GameFragment extends Fragment {


    public RelativeLayout rlCollect;

    public GameFragment() {
        // Required empty public constructor
    }


    @Override
    public View onCreateView(LayoutInflater inflater, ViewGroup container,
                             Bundle savedInstanceState) {
        // Inflate the layout for this fragment
        return inflater.inflate(R.layout.fragment_game, container, false);
    }

    @Override
    public void onViewCreated(View view, @Nullable Bundle savedInstanceState) {
        super.onViewCreated(view, savedInstanceState);
        rlCollect = ((RelativeLayout) view.findViewById(R.id.rl_collect));
        rlCollect.setOnClickListener(new OnClickListener() {
            @Override
            public void onClick(View view) {
                Intent intent = new Intent(getContext(), MyCollectActivity.class);
                getContext().startActivity(intent);
            }
        });
    }
}
